<?php

/*
 * Class teia\webdev\php\core\login_form
* Core Log in form
*
* @author Bernardo Quibiana
* @date created: 20111002
*
* @date modified: 20111018
* @modified: Bernardo Quibiana
*/

// namespace declaration: Core Templates
namespace teia\webdev\php\core;

// define displayble text values, if undefined
if (!isset($action)) $action = 'login.php';
if (!isset($method)) $method = 'POST';

if (!isset($header_txt)) $header_txt = 'Log in';

if (!isset($email_txt)) $email_txt = 'E-mail';
if (!isset($passwd_txt)) $passwd_txt = 'Password';

if (!isset($passwd_help_action)) $passwd_help_action = 'passwordhelp.php';
if (!isset($passwd_help_txt)) $passwd_help_txt = 'Forgot password';

if (!isset($submit_txt)) $submit_txt = 'Submit';

?>

<!-- Display user log-in form -->
<div id="usr_login_form">
	<form class="login_form" method="<?php echo $method; ?>" action="<?php echo $action; ?>">
		<fieldset class="form_fieldset">
			<legend><?php echo $header_txt; ?></legend>
			<input type="hidden" name="form_name" value="login_form" />
			<p class="login_txt">
				<label class="input_label" for="login_email_input"> <?php echo $email_txt; ?>:</label> 
				<input class="input_field" id="login_email_input" type="email" name="email" required="required" />
			</p>
			<p class="login_txt">
				<label class="input_label" for="login_password_input"><?php echo $passwd_txt; ?>:</label>
				<input class="input_field" id="login_password_input" type="password" name="password" required="required" />
			</p>
			<p class="login_help">
				<a class="login_help" href="<?php echo $passwd_help_action; ?>"><?php echo $passwd_help_txt; ?></a>
			</p>
			<p class="login_submit">
				<input type="submit" name="submit" value="<?php echo $submit_txt; ?>" />
			</p>
		</fieldset>
	</form>
</div>
